package com.example.obj;

import java.util.Collection;

public class ContactSet extends BaseSet<ContactObject>{
	public ContactSet(){
		super();
	}
	
	public ContactSet(Collection<ContactObject> contacts){
		super(contacts);
	}

	public ContactSet without(ContactObject contact) {
		ContactSet contactSet = new ContactSet(getElements());
		contactSet.remove(contact);
		return contactSet;	
	}
	
	public ContactSet with(ContactObject contact) {
		ContactSet contactSet = new ContactSet(getElements());
		contact.setId("$$$");
		contactSet.add(contact);
		contact.setId(null);
		return contactSet;	
	}

	public ContactSet copy() {
		ContactSet contactSet = new ContactSet(getElements());
		return contactSet;	
	}
}
